import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] matrix = new int[n][n];
        for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                if (i == j) {
                    matrix[i][j] = i + 1;
                }
            }
        }
        for (int i = 0; i < n-1; i++) {
            for (int j = 0; j < n; j++) {
                for (int k = 0; k < n; k++) {
                    if(k>j){
                        matrix[j][k] = matrix[j][k-1]+matrix[j+1][k];
                    }
                }
            }
        }

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (j < i) {
                    System.out.printf("%5s", "");
                } else {
                    System.out.printf("%5d", matrix[i][j]);
                }
            }
            System.out.println();
        }
    }
}